package com.bear.fastrepair.base

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import com.bear.fastrepair.R
import com.blankj.utilcode.util.ScreenUtils

abstract class BaseDialog(context: Context) : Dialog(context, R.style.Dialog) {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val layoutParam = window?.attributes
        window?.decorView?.setPadding(0, 0, 0, 0)
        layoutParam?.width = ScreenUtils.getScreenWidth() - 100
        layoutParam?.gravity = Gravity.CENTER
        window?.attributes = layoutParam
    }

}